/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { checkAndTriggerRefresh } from '@/components/_pages/red-point/_utils';
import request from '@/utils/request';

// 获取短信审核列表
export async function getSmsList(params: any, fromRedDot?: boolean) {
  return request('/CustomerServiceV2/getSmsReviewList', {
    method: 'POST',
    data: params,
  }).then(checkAndTriggerRefresh(getSmsList, fromRedDot));
}

// 获取用户短信列表
export async function getRecordList(params: any) {
  return request('/CustomerServiceV2/getTodaySentList', {
    method: 'POST',
    data: params,
  });
}

// 短信审核-升级操作
export async function upgradation(params: any) {
  return request('/CustomerServiceV2/upgradeUserTypeForSendSms', {
    method: 'POST',
    data: params,
  });
}

// 短信审核-其他操作
export async function operate(params: any) {
  return request('/CustomerServiceV2/approveSmsReview', {
    method: 'POST',
    data: params,
  });
}
